同理 apt-get install -y libzip-dev
完後可以安裝zip...
apt-get install libcurl4-openssl-dev
完後可以安裝 docker-php-ext-install curl
然後還需要 apt-get install unzip
把原本的cake資料夾刪掉再試一次composer,就可以成功安裝cake了
再接著設定URL Rewriting的部分
<Directory />
Options FollowSymLinks
AllowOverride All
# Require all denied
</Directory>
<Directory /usr/share>
AllowOverride None
Require all granted
</Directory>
<Directory /var/www/>
Options Indexes FollowSymLinks
AllowOverride All
Require all granted
Allow from all
</Directory>
接著再輸入
a2enmod rewrite
service apache2 restart
可喜可賀~~~
不過database顯示unable to connect
先進到 myc/config/app_local.php
改成以下這樣試試
'Datasources' => [
'default' => [
'host' => 'mysql',
/*
* CakePHP will use the default DB port based on the driver selected
* MySQL on MAMP uses port 8889, MAMP users will want to uncomment
* the following line and set the port accordingly
*/
//'port' => 'non_standard_port_number',
'username' => 'root',
'password' => 'secret',
'database' => 'cake',
'encoding' => 'utf8mb4',
'timezone' => 'UTC',
/*
* If not using the default 'public' schema with the PostgreSQL driver
* set it here.
*/
//'schema' => 'myapp',
/*
* You can use a DSN string to set the entire configuration
*/
'url' => env('DATABASE_URL', null),
],
太棒惹~
接下來的問題是這個container該如何可以被ssh從外部code連接到呢?